// TOWN DIALOGUE SCRIPT
//    Town 17: Corinth (after winning)

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

short choice, tt;

// *** Guards ***
begintalknode 1;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Guard";
	text1 = "The guard is too busy cleaning up the town to converse with you.";
	text2 = "He does offer a cherry wave before continuing on his way.";
	action = END_TALK;

// *** Paul ***
begintalknode 6;
	state = -1;
	personality = 1706;
	nextstate = 7;
	condition = 1;
	question = "Paul";
	text1 = "A well-versed instructor is scribbling on some paper behind the counter.";
	text2 = "He looks up as you approach.  _Welcome, I'm Paul, your instructor._ he says.";
	text3 = "_Thank you for your effort._ he adds.  _Would you like some training now?_";
	text5 = "Paul is busy working on a class schedule for the school.";
	text6 = "Now that The Wilderness if free of its plight, students will soon flock back to the training academy.";
	text6 = "He pauses as you get close and asks _Back for more?_";
	action = INTRO;

begintalknode 7;
	state = 7;
	personality = 1706;
	nextstate = -1;
	condition = 1;
	question = "What do you teach?";
	text1 = "Paul replies _I can lead you into training for whatever you already know._";
	text2 = "_The cost is quite inexpensive for the only training facility in The Wilderness._";
	text3 = "_Are you ready to begin training?_ Paul asks.";

begintalknode 8;
	state = 7;
	personality = 1706;
	nextstate = -1;
	condition = (get_flag(17, 5) == FALSE);
	question = "How much to train?";
	text1 = "Paul replies _It will cost you 10 coins apiece to enter into the training rooms._";
	text2 = "_We're running a special since you are responsible for The Wilderness being set free._";
	text2 = "_Is that agreeable?_ Paul asks.";
	code =
		set_flag(17, 5, TRUE);
	break;

begintalknode 9;
	state = 7;
	personality = 1706;
	nextstate = -1;
	condition = ((get_flag(17, 5) > 0) && (has_special_item(9) == 0));
	question = "I'd like to train (10 coins apiece).";
	text1 = "Paul takes your money and gives you a key.";
	text2 = "_Here you go.  Train hard_ he says.";
	text3 = "_You don't have enough coins for your party_ Paul says.";
	text4 = "_Come back when you have the required amount._";
	code =
		tt = (party_size() * 10);
		clear_strings();
		if (coins_amount() < tt) {
			add_string(3);
			add_string(4);
		}
		else {
			play_sound(15);
			add_string(1);
			add_string(2);
			change_coins(0 - tt);
			change_spec_item(9, 1);
		}
	break;

begintalknode 10;
	state = 7;
	personality = 1706;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "Paul waves and goes back to working on what he was doing before.";
	action = END_TALK;
